package com.cat.model.common.model.base;

import com.alonew.core.commons.model.BaseVOLong;
import com.cat.model.common.util.ReflectUtil;


public abstract class ModelBaseVOLong extends BaseVOLong{
	/**
	 * 
	 */
	private static final long serialVersionUID = -4268393632384226959L;
	
	private transient String keyName = "id";
	private transient Long keyValue;
	
	@Override
	protected String[] escape() {
		return  new String[]{this.getKeyName(), "keyName", "keyValue"};
	}
	
	@Override
	public void buildFields(boolean allowNull, String... keys) {
		super.buildFields(allowNull, keys);
		this.setKeyValue((Long) ReflectUtil.getReflectValue(this, this.getKeyName()));
	}

	public String getKeyName() {
		return keyName;
	}

	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}

	public Long getKeyValue() {
		return keyValue;
	}

	public void setKeyValue(Long keyValue) {
		this.keyValue = keyValue;
	}
}
